from flask import Flask, make_response

app = Flask(__name__)

@app.route('/')
def index():
    # 方式1:
    # return 'ok'
    # 方式2:
    # 构建响应对象
    response = make_response('ok')
    # 返回响应对象
    return response

if __name__ =='__main__':
    app.run(debug=True)